import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import CKEditor from '@ckeditor/ckeditor5-vue2'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import 'view-design/dist/styles/iview.css'

import './assets/iconfont/iconfont.js'
import './assets/iconfont/iconfont.css'

import KeepRatio from 'vue-keep-ratio'

import Contextmenu from 'vue-contextmenujs'

import Eagle from 'eagle.js'
import 'animate.css'

import VueGridLayout from 'vue-grid-layout'

import Echarts from 'vue-echarts'
import 'zrender/lib/svg/svg'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/line'
import 'echarts/lib/chart/pie'
import 'echarts/lib/chart/map'
import 'echarts/lib/chart/radar'
import 'echarts/lib/chart/scatter'
import 'echarts/lib/chart/effectScatter'
import 'echarts/lib/chart/funnel'
import 'echarts/lib/chart/sankey'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/toolbox'
import 'echarts/lib/component/title'
import 'echarts/lib/component/timeline'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/visualMap'
import 'echarts/lib/component/dataset'
import 'echarts/lib/component/radar'
import 'echarts/lib/component/dataZoom'

// Map of China
import worldMap from 'echarts/map/json/world.json'
import chinaMap from 'echarts/map/json/china.json'
// registering map data
import macarons from './components/Theme/macarons.json'
import infographic from './components/Theme/infographic.json'
import roma from './components/Theme/roma.json'
import vintage from './components/Theme/vintage.json'
import shine from './components/Theme/shine.json'
import 'echarts-wordcloud'
import 'echarts-gl'

Echarts.registerTheme('macarons', macarons)
Echarts.registerTheme('infographic', infographic)
Echarts.registerTheme('roma', roma)
Echarts.registerTheme('vintage', vintage)
Echarts.registerTheme('shine', shine)
Echarts.registerMap('world', worldMap)
Echarts.registerMap('china', chinaMap)
Vue.component('v-chart', Echarts)

Vue.component('grid-layout', VueGridLayout.GridLayout)
Vue.component('grid-item', VueGridLayout.GridItem)

Vue.use(Eagle)
Vue.use(Contextmenu)

Vue.use(ElementUI)

Vue.use(CKEditor)
Vue.use(KeepRatio)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
